package com.zankong.tool.zkappforas.div_item;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import com.zankong.tool.zkapp.document.ZKDocument;
import com.zankong.tool.zkapp.item.ZKAdapter;
import com.zankong.tool.zkapp.util.ZKAppAdapter;
import com.zankong.tool.zkappforas.R;

import org.dom4j.Element;

/**
 * Created by YF on 2018/9/14.
 */
@ZKAppAdapter("homeTask")
public class HomeTask extends ZKAdapter {
    public HomeTask(ZKDocument zKDocument, Element element) {
        super(zKDocument, element);
    }

    @Override
    protected RecyclerView.ViewHolder onCreate(@NonNull ViewGroup viewGroup, int i) {
        return new TaskRun(mLayoutInflater.inflate(R.layout.item_task_home,viewGroup,false));
    }

    @Override
    protected int getVIewType(int position) {
        return 0;
    }

    @Override
    protected void onBind(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
        if (viewHolder instanceof TaskRun){
            ((TaskRun) viewHolder).init(position);
        }
    }

    private class TaskRun extends RecyclerView.ViewHolder{
        public TaskRun(@NonNull View itemView) {
            super(itemView);
        }
        private void init(int position){

        }
    }
}
